package com.diandian.backend.entrance.client;

import com.diandian.backend.entrance.client.dto.*;
import com.diandian.base.boot.starter.response.BaseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("douyin-life-exchange")
//@FeignClient(value = "business-kuaishou-life-exchange", url = "http://localhost:10011", path = "")
public interface DianDianDouyinLifeExchangeClient {

    @GetMapping("/token/get")
    BaseResult getToken(@RequestHeader(value = "clientKey") String clientKey,
                               @RequestHeader(value = "clientSecret") String clientSecret);

    @GetMapping("/order/query/time")
    BaseResult queryByTime(@RequestHeader(value = "clientKey") String clientKey,
                              @RequestHeader(value = "clientSecret") String clientSecret,
                              @RequestHeader(value = "account") String account,
                              @RequestParam(value = "date") String date);

    @GetMapping("/order/query/num")
    BaseResult queryByNum(@RequestHeader(value = "clientKey") String clientKey,
                             @RequestHeader(value = "clientSecret") String clientSecret,
                             @RequestHeader(value = "account") String account,
                             @RequestParam(value = "orderNum") String orderNum);

    @PostMapping("/member/points/change")
    BaseResult pointsChange(@RequestHeader(value = "clientKey") String clientKey,
                                                           @RequestHeader(value = "clientSecret") String clientSecret,
                                                           @RequestHeader(value = "account") String account,
                                                           @RequestBody MemberPointsChangeReqDTO req);

    @PostMapping("/member/mobile/change")
    BaseResult mobileChange(@RequestHeader(value = "clientKey") String clientKey,
                                   @RequestHeader(value = "clientSecret") String clientSecret,
                                   @RequestHeader(value = "account") String account,
                                   @RequestBody MemberMobileChangeReqDTO req);

    @PostMapping("/member/unbind")
    BaseResult unbind(@RequestHeader(value = "clientKey") String clientKey,
                             @RequestHeader(value = "clientSecret") String clientSecret,
                             @RequestHeader(value = "account") String account,
                             @RequestBody MemberUnbindChangeReqDTO req);

    @PostMapping("/certificate/verification/prepare")
    BaseResult prepare(@RequestHeader(value = "clientKey") String clientKey,
                       @RequestHeader(value = "clientSecret") String clientSecret,
                       @RequestHeader(value = "account") String account,
                       @RequestHeader(value = "belong") String belong,
                       @RequestBody CertificatePrepareReqDTO req);

    @PostMapping("/certificate/verification/verify")
    BaseResult verify(@RequestHeader(value = "clientKey") String clientKey,
                             @RequestHeader(value = "clientSecret") String clientSecret,
                             @RequestHeader(value = "belong") String belong,
                             @RequestBody CertificateVerifyReqDTO req);
}
